package com.itls.recommendedgames.service;

import com.itls.recommendedgames.entity.Game;
import com.itls.recommendedgames.entity.User;

import java.util.List;
import java.util.Map;

public interface RecommendationService {
    // 热门推荐（不依赖用户个人数据，但会过滤用户已拥有的游戏）
    List<Game> getPopularGames(int limit, boolean includeTrending);
    List<Game> getPopularGamesForUser(Integer userId, int limit, boolean includeTrending);
    
    // 个人个性化推荐（基于混合推荐，包含游玩时间、个人标签推荐、类型用户）
    List<Game> getPersonalizedRecommendations(User user, int limit);
    
    // 辅助方法
    Map<String, Integer> getUserTagFrequency(List<Integer> ownedGameIds);
    Map<String, Double> getUserTagFrequencyWithPlayTime(List<Integer> ownedGameIds, Map<Integer, Double> playTimeMap);
    Map<Integer, Map<String, Integer>> getAllGameTagFrequencies();
    Map<Integer, Double> getGamePopularityScores();
    List<Integer> getSimilarUsers(Integer userId);
    List<Integer> getSimilarUsersByPlayTime(Integer userId);
    List<Integer> getSimilarGamesByTags(List<String> tagNames, int limit);
    List<Game> getAllGamesByIds(List<Integer> gameIds);
    
    // 用户类型分析
    String analyzeUserType(User user);
}
